/**   
 * @Title: DuiZhenXinXiCommunicater.java 
 * @Package com.esun.rabbit2.communicaters.hemai 
 * @Description: TODO(用一句话描述该文件做什么) 
 * @author: Billy Qigs@500wan.com   
 * @date: 2011-12-7 上午11:14:16  
 * Copyright: (C) 2011 Shenzhen E-sun Sky Net Technology Co.,ltd.
 */
package com.esun.rabbit2.communicaters.hemai;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;

import javax.xml.parsers.ParserConfigurationException;

import org.apache.http.client.ClientProtocolException;
import org.xml.sax.SAXException;

import com.esun.config.BussinessCode;
import com.esun.config.Config;
import com.esun.network.ServerCommunicater;

/**
 * @ClassName: DuiZhenXinXiCommunicater
 * @Description: (获取足彩对阵信息接口)
 * @author: Billy Qigs@500wan.com
 * @date: 2011-12-7 上午11:14:16
 * 
 */
public class DuiZhenXinXiCommunicater extends ServerCommunicater {

	private String serverMsg = "";

	public boolean isGetDuiZhenXinXiSucceed() throws ClientProtocolException, IOException, ParserConfigurationException, SAXException {

		boolean isSucceed = false;

		ArrayList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();
		list.add(mapItem(BussinessCode.PASER_MID, BussinessCode.MID_GET_SHENGFU_DUIZHENXINXI));
		list.add(mapItem(BussinessCode.PASER_CK, Config.NULLMARK));

		// 写入服务器返回信息
		super.getServerResponse(list, true);
		setServerMessage(super.getServerMsg());
		if (super.getState() == 100) {
			isSucceed = true;
		} else {
			isSucceed = false;
		}
		return isSucceed;

	}

	private void setServerMessage(String str) {
		serverMsg = str;
	}

	public String getServerMsg() {
		return serverMsg;
	}

	private HashMap<String, String> mapItem(String name, String value) {
		HashMap<String, String> map = new HashMap<String, String>();
		map.put(name, value);
		return map;
	}

}
